package com.kly.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kly.domain.dto.space.SpaceAnalysisRequest;
import com.kly.domain.dto.space.SpaceRankAnalyzeRequest;
import com.kly.domain.dto.space.SpaceUserAnalysisRequest;
import com.kly.domain.entity.Picture;
import com.kly.domain.entity.Space;
import com.kly.domain.entity.User;
import com.kly.domain.vo.space.*;

import java.util.List;

/**
 * @author admin
 * @description 针对表【space(空间)】的数据库操作Service
 * @createDate 2025-03-11 12:40:49
 */
public interface SpaceAnalysisService extends IService<Space> {

    /**
     * 校验空间分析权限
     */
    void checkSpaceAnalysisAuth(SpaceAnalysisRequest spaceAnalysisRequest, User loginUser);

    /**
     * 校验空间权限
     * @param space
     * @param loginUser
     */
    void checkSpaceAuth(Space space, User loginUser);
    /**
     * 填充查询参数
     */
    void fillQueryWrapper(SpaceAnalysisRequest spaceAnalysisRequest, QueryWrapper<Picture> queryWrapper);

    /**
     * 获取空间使用情况
     * @param spaceAnalysisRequest
     * @param loginUser
     * @return
     */
    SpaceUsageAnalyzeResponse getSpaceUsageAnalyze(SpaceAnalysisRequest spaceAnalysisRequest, User loginUser);


    /**
     * 获取空间分类情况
     * @param spaceAnalysisRequest
     * @param loginUser
     * @return
     */
    List<SpaceCategoryAnalyzeResponse> getSpaceCategoryAnalyze(SpaceAnalysisRequest spaceAnalysisRequest, User loginUser);


    /**
     * 获取空间标签情况
     * @param spaceAnalysisRequest
     * @param loginUser
     * @return
     */
    List<SpaceTagAnalyzeResponse> getSpaceTagAnalyze(SpaceAnalysisRequest spaceAnalysisRequest, User loginUser);


    /**
     * 获取空间大小情况
     * @param spaceAnalysisRequest
     * @param loginUser
     * @return
     */
    List<SpaceSizeAnalyzeResponse> getSpaceSizeAnalyze(SpaceAnalysisRequest spaceAnalysisRequest, User loginUser);


    /**
     * 获取空间用户情况
     * @param spaceUserAnalysisRequest
     * @param loginUser
     * @return
     */
    List<SpaceUserAnalyzeResponse> getSpaceUserAnalyze(SpaceUserAnalysisRequest spaceUserAnalysisRequest, User loginUser);


    /**
     * 获取空间排名
     * @param spaceRankAnalyzeRequest
     * @param loginUser
     * @return
     */
    List<Space> getSpaceTop5Analyze(SpaceRankAnalyzeRequest spaceRankAnalyzeRequest, User loginUser);
}
